package com.fenda.Dao;

import com.fenda.pojo.Student;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface UserDao{
    @Select("select * from student")
    List<Student> SelectAll();
    @Select("select id from student where id=#{id}")
    int SelectId(int i);
    @Delete("DELETE FROM student where id = #{id}")
    int delect(int id);
    @Insert("insert into student(id,name,age,hobby)values(#{id},#{name},#{age},#{hobby})")
    int add(Student student);
    @Update("UPDATE student SET name=#{name},age=#{age},hobby=#{hobby}" )
    int update(Student student);
}
